package com.wang.designpattern.composite;

public class Client {

    public static void main(String[] args) {
        University university = new University("大学A", "");
        College college1 = new College("学院A", "");
        College college2 = new College("学院B", "");
        university.add(college1);
        university.add(college2);

        Department department1 = new Department("专业A", "");
        Department department2 = new Department("专业B", "");
        Department department3 = new Department("专业C", "");
        Department department4 = new Department("专业D", "");

        college1.add(department1);
        college1.add(department2);
        college2.add(department3);
        college2.add(department4);

        university.print();
    }
}
